<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions">
    <ui:composition template="/layout/masterpage_admin.xhtml">
        <f:metadata>
            
            <f:event type="preRenderView" listener="#{sys_NguoiDungController.onPageLoad_CheckAdmin()}">
                
            </f:event>
        </f:metadata>
        
         <ui:define name="ui-header">
             <title>#{utilsController.getLanguages("TaoMoiCapNhat")}</title>
        </ui:define>
        
        
        <ui:define name="ui-content">
            <div class="panel panel-blue margin-bottom-40">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-tasks"></i> #{utilsController.getLanguages("DangKynganhang")}</h3>
                </div>
                <div class="panel-body"> 
                    <c:set value="#{sI_QuocGiaController.findAllQuocGia()}" var="lstQuocGia" scope="session"></c:set>
                    <h:form class="margin-bottom-40" id="frmnganhang">
                        <p:growl id="growl" showDetail="true" sticky="true" escape="false" />
                        <div class="row">
                            <div class="col-md-3">
                                <label for="cboQuocGiaID">#{utilsController.getLanguages("QuocGia")}(<span style="color: red;">*</span>)</label>

                                <select id="cboQuocGiaID" class="form-control" value="#{sI_NganHangController.item.quocGiaID}" onselect="getListTinh_nganhang();" >
                                    <c:forEach items="#{lstQuocGia}" var="item">
                                        <option  value="#{item.getQuocGiaID()}" selected="#{(sI_NganHangController.item.getQuocGiaID().trim()==item.getQuocGiaID()?'selected':'')}" >#{item.getTenQG()}</option>
                                    </c:forEach>                                                                    
                                </select>
                            </div>
                            <div class="col-md-3">
                                 <p:outputPanel id="pnTinh">
                                     <c:set var="lstTinh" value="#{sI_NganHangController.findAllTinh()}" scope="session"></c:set>
                                        <label for="cboTinhID">#{utilsController.getLanguages("Tinh")} (<span style="color: red;">*</span>)</label>
                                        <select id="cboTinhID" class="form-control" value="#{sI_NganHangController.item.tinhID}">
                                            <c:forEach items="#{lstTinh}" var="item">
                                                <option value="#{item.getTinhID()}">#{item.getTenTinh()}</option>
                                            </c:forEach>
                                        </select>
                                </p:outputPanel>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                               <label for="txtTenNH">#{utilsController.getLanguages("TenNH")}(<span style="color: red;">*</span>)</label>
                               <input id="txtTenNH" value="#{sI_NganHangController.item.tenNH}" class="form-control" />
                            </div>
                        </div>
                         <div class="row">
                            <div class="col-md-6">
                               <label for="txtDiaChi">#{utilsController.getLanguages("DiaChi")}(<span style="color: red;">*</span>)</label>
                               <input id="txtDiaChi" value="#{sI_NganHangController.item.diaChi}" class="form-control" />
                            </div>
                        </div>
                       
                         <div class="row">
                            <div class="col-md-3">
                                <label for="txtDienThoai">#{utilsController.getLanguages("DienThoai")}</label>
                                <input id="txtDienThoai" value="#{sI_NganHangController.item.dienThoai}" class="form-control" />
                               
                            </div>
                            <div class="col-md-3">
                                  <label for="txtEmail">#{utilsController.getLanguages("Email")}</label>
                                  <input id="txtEmail" value="#{sI_NganHangController.item.email}" class="form-control" />
                            </div>
                        </div>
                        <button class="btn-u btn-u-blue" type="button" onclick="Save_nganhang_Click();">#{utilsController.getLanguages("Save")}</button>
                        <a href="/Admin/si/banks.html" class="btn-u btn-u-aqua">#{utilsController.getLanguages("Cancel")}</a>
                        <p:remoteCommand name="Save_nganhang" actionListener="#{sI_NganHangController.btnSave_Click}" update=":frmnganhang"></p:remoteCommand>
                        
                        <p:remoteCommand name="cmdGetListTinh" actionListener="#{sI_NganHangController.cmd_getListTinh_Click}" update=":frmnganhang:pnTinh"></p:remoteCommand>
                    </h:form>
                </div>
            </div>
            
        </ui:define>
    </ui:composition> 
</html>